<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        var twosum=function(arr,target){
            var result = new Array(2);
            for(var i=0;i<arr.length-1;i++){
            for (var j = i+1; j < arr.length; j++) {
            if (arr[i] + arr[j] == target) {
                result[0] = i;
                result[1] = j;
                break;
            }
        }
        
            }
            return result;
        } 
        twosum([1,3,6,9],15);

        var twoarr=function(arr1,arr2){
            var result=new Array();
            for(var i=0;i<arr1.length-1;i++){
                
            }
            for(var i=0;i<arr1.length-1;i++){
                console.log(arr1[i])
            }
            return result;
        }
        twoarr([1,5,6],[5,6,8]);
    </script>
</body>
</html>